//
//  ZH_HomeViewModel.m
//  WisdomStar
//
//  Created by zhangliwen on 2018/11/7.
//  Copyright © 2018年 zhangliwen. All rights reserved.
//

#import "ZH_HomeViewModel.h"
#define apiIndex     @"/api/api/index"
//资讯首页
#define articleIndex     @"/api/article/index"
@implementation ZH_HomeViewModel
//首页接口
- (void)homeResultBlock:(WBRequestResultBlock)resultBlock{
    [[WB_MessageManager shareMessageManager] requestPostWithAction:apiIndex dictionaryParam:@{@"token":[DATAMODEL.configDBHelper getToken]} withResultBlock:^(NSString *code, NSString *message, id data) {
        if (resultBlock) {
            resultBlock(code,message,data);
        }
    }];
}
//资讯首页
- (void)informationResultBlock:(WBRequestResultBlock)resultBlock{
    [[WB_MessageManager shareMessageManager] requestPostWithAction:articleIndex dictionaryParam:@{@"token":[DATAMODEL.configDBHelper getToken]} withResultBlock:^(NSString *code, NSString *message, id data) {
        if (resultBlock) {
            resultBlock(code,message,data);
        }
    }];
}
@end
